//
//  RealViewController.swift
//  PresentView
//
//  Created by 郑东喜 on 2016/12/5.
//  Copyright © 2016年 郑东喜. All rights reserved.
//

import UIKit

class RealViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        view.backgroundColor = UIColor.white
        
        let btn = UIButton()
        btn.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        btn.center = view.center
        btn.backgroundColor = UIColor.red
        view.addSubview(btn)
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        let viewController = ShareViewController()
        viewController.view.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
        self.present(viewController, animated: true, completion: nil)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

}
